package com.sscw.task.enums;

/**
 * @Author: sunxuzong
 * @Date: 2024/07/19
 */
public enum BattleStatusEnum {
    go_battle(0,"挑战TA"),
    battling(1,"挑战中"),
    unclaimed(2,"待领取"),
    received_already(3,"已领取"),
    failed(4,"挑战失败")
    ;

    private Integer code;

    private String desc;

    BattleStatusEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static BattleStatusEnum getByCode(Integer code){
        for (BattleStatusEnum enums : BattleStatusEnum.values()){
            if (enums.getCode().equals(code)){
                return enums;
            }
        }
        return  null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
